<template>
  <view class="index">
    <nut-button type="primary" @click="onClick">按钮1</nut-button>
    <nut-button type="primary" @click="onClick2">按钮2</nut-button>
    <view className="text-[#acc855] text-[100px]">Hello world!</view>
    <view class="text-[#acc855] text-[100px]">Hello world!</view>
    <nut-toast v-model:visible="show" msg="你成功了" />
  </view>
</template>

<script setup>
import { ref } from "vue";
import Taro from "@tarojs/taro";
const show = ref(false);
const onClick = () => {
  show.value = true;
};
const onClick2 = () => {
  Taro.showToast({
    title: "成功",
    icon: "success",
    duration: 2000,
  });
};
</script>
